Repository navigation
fix(libSceVoice): return the module's initialization errors - #8059
Conversation
A second sceVoiceInit returns 0x804E0802, and sceVoiceStart, sceVoiceCreatePort and sceVoiceGetPortInfo return 0x804E0801 before checking any argument while the library is not initialized, as the shipped module does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
|
Windows run: Windows 11 Home 26300, Ryzen 5 9600X, WinLibs GCC 15.2.0, Release, BUILD_TESTING=ON. This PR merged onto
AI-assisted: yes (Claude Code); results above were run on this machine. |
# Conflicts: # docs/dev/debt/libSceVoice.md
|
Rebase handoff — rebased onto current Verified on Linux (CachyOS, kernel 7.2.9, GCC 16.2.1, Ninja, Release, To pick it up: Head is |
What
libSceVoice now returns the module's own errors for its initialization state: a second
sceVoiceInitreturns0x804E0802, andsceVoiceStart,sceVoiceCreatePortandsceVoiceGetPortInforeturn0x804E0801while the library is not initialized, before they look at any argument. Onmainall four throw.Source of the behaviour. prosper's reading of the shipped
libSceVoice.sprx, added in prosper#4473 and rated "CONFIDENCE: HIGH (read from the shipped module)":On
main:sceVoiceInitthrowsalready initialized.sceVoiceStart,sceVoiceCreatePortandsceVoiceGetPortInfocheck their arguments first, then throwlibrary not initialized.Only the three entry points the source gives a module address for change. The other port and lifecycle calls keep throwing when the library is not initialized, so that no code is applied without its own evidence (see #4183). After initialization every argument and port check throws exactly as before. A null
sceVoiceInitparam still throws first, because the source does not say whether the module checks it before its state.Changes:
Export.cpp: the two codes;sceVoiceInitreturns0x804E0802;Start,CreatePortandGetPortInfocheck the state first.guest_voice, newTestNotInitialized, run beforesceVoiceInitand again aftersceVoiceEnd:0x804E0801;CreatePortleaves*port_idandGetPortInfoleaves*infountouched;sceVoiceInitreturns0x804E0802.docs/dev/debt/libSceVoice.md: a new entry for what the source does not cover.Tested
Linux (GitHub Codespace, 4 cores, native build of this branch on
7a015c094):guest_voice: 5/5 runs pass.Export.cppfrommain,guest_voiceaborts (sceVoiceStart: invalid argument); 5/5 pass again after restoring it.Windows (fork CI, run 39292746672, this branch on
7a015c094): build and the full test suite pass, 1683/1683.Checks:
python3 tools/check_conventions.py --base origin/mainpasses.python3 tools/pr_overlap.py --branch fix/voice-not-init-codes: feat(libs): add the Voice and IME exports PPSA24191 needs to load #7852 appends to the same debt list, so whichever merges second needs a one-line rebase; test: organize library tests and label CTest suites #6044 (test reorganization) could not be compared. fix(libSceVoice): queue the packets sceVoiceWriteToIPort accepts #7566 and feat(libSceVoice): accept WriteToIPort on input ports (PPSA34015) #6090 changesceVoiceWriteToIPortand do not overlap.tools/progress.py: unchanged (4117/5157 on base and head); this corrects return values only.Checklist
main(7a015c094); no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)